//
//  PlayerSkinView.m
//  GenericProject
//
//  Created by 皮蛋菌 on 2023/5/9.
//  Copyright © 2023 漠然丶情到深处. All rights reserved.
//

#import "PlayerSkinView.h"

@interface PlayerSkinView ()

@end

@implementation PlayerSkinView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews {
    CGFloat leftSafePadding = 0.0;
    CGFloat rightSafePadding = 0.0;
    CGFloat bottomSafePadding = 0.0;
    if (@available(iOS 11.0, *)) {
        leftSafePadding = self.safeAreaInsets.left;
        rightSafePadding = self.safeAreaInsets.right;
        bottomSafePadding = self.safeAreaInsets.bottom;
    }
    CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
    
    self.blackButton = [[UIButton alloc]init];
    [self.blackButton setImage:LSImageNamed(@"back_white") forState:UIControlStateNormal];
    [self.blackButton addTarget:self action:@selector(blackAction) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.blackButton];
    
    self.titleLabel = [[UILabel alloc]init];
    self.titleLabel.textColor = LSWhiteColor;
    [self addSubview:self.titleLabel];
    
    self.timeLabel = [[UILabel alloc] init];
    self.timeLabel.text = @"00:00";
    self.timeLabel.textColor = LSWhiteColor;
    self.timeLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.timeLabel];
    
    self.durationLabel = [[UILabel alloc] init];
    self.durationLabel.text = @"00:00";
    self.durationLabel.textColor = LSWhiteColor;
    self.durationLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.durationLabel];
    
    self.progressSlider = [[UISlider alloc] init];
    self.progressSlider.minimumValue = 0;
    self.progressSlider.maximumValue = 1;
    [self.progressSlider addTarget:self action:@selector(progressSliderValueChanged:) forControlEvents:UIControlEventValueChanged];
    [self addSubview:self.progressSlider];
    
    self.playButton = [[UIButton alloc] init];
    [self.playButton setImage:LSImageNamed(@"暂停") forState:UIControlStateNormal];
    [self.playButton setImage:LSImageNamed(@"播放") forState:UIControlStateSelected];
    [self.playButton addTarget:self action:@selector(playAction:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.playButton];
    
    
    //    self.volumeSlider = [[UISlider alloc] init];
    //    [self.volumeSlider addTarget:self action:@selector(volumeSliderValueChanged:) forControlEvents:UIControlEventValueChanged];
    //    [self addSubview:self.volumeSlider];
    //    [self.volumeSlider mas_makeConstraints:^(MASConstraintMaker *make) {
    //        make.centerX.equalTo(self.mas_centerX);
    //        make.centerY.equalTo(self.mas_centerY);
    //        make.size.mas_equalTo(CGSizeMake(LSSYRealValue(100), LSSYRealValue(40)));
    //    }];
    
    //    MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:CGRectMake(-2000, -2000, 0, 0)];
    //    [self addSubview:volumeView];
    //    for (UIView *view in volumeView.subviews) {
    //        if ([view.class.description isEqualToString:@"MPVolumeSlider"]) {
    //            self.volumeSlider = (UISlider *)view;
    //            self.volumeSlider.autoresizesSubviews = YES;
    //            self.volumeSlider.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    //            self.volumeSlider.transform = CGAffineTransformMakeRotation(-M_PI_2);
    //            [self addSubview:self.volumeSlider];
    //            [self.volumeSlider mas_makeConstraints:^(MASConstraintMaker *make) {
    //                make.centerX.equalTo(self.mas_centerX);
    //                make.centerY.equalTo(self.mas_centerY);
    //                make.size.mas_equalTo(CGSizeMake(LSSYRealValue(100), LSSYRealValue(40)));
    //            }];
    //            break;
    //        }
    //    }
    
    //    self.brightnessSlider = [[UISlider alloc] init];
    //    [self addSubview:self.brightnessSlider];
    //    [self.brightnessSlider mas_makeConstraints:^(MASConstraintMaker *make) {
    //        make.centerX.equalTo(self.mas_centerX);
    //        make.centerY.equalTo(self.mas_centerY);
    //        make.size.mas_equalTo(CGSizeMake(LSSYRealValue(100), LSSYRealValue(40)));
    //    }];
    
    self.rateButton = [[UIButton alloc] init];
    self.rateButton.backgroundColor = LSGrayColor;
    [self.rateButton setTitle:@"1.0" forState:UIControlStateNormal];
    [self.rateButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.rateButton.layer.masksToBounds = YES;
    [self.rateButton addTarget:self action:@selector(rateAction:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.rateButton];
    
    self.fullScreenButton = [[UIButton alloc]init];
    [self.fullScreenButton setImage:LSImageNamed(@"全屏") forState:UIControlStateNormal];
    [self.fullScreenButton addTarget:self action:@selector(fullScreenAction:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.fullScreenButton];
    
    if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait || [UIApplication sharedApplication].statusBarOrientation == UIDeviceOrientationPortraitUpsideDown) {
        [self.blackButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20] + LSNAVIGATION_BAR_HEIGHT);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.blackButton.mas_centerY);
            make.left.equalTo(self.blackButton.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:10]);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-70]);
        }];
        
        self.titleLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:18]);
        self.timeLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:12]);
        self.durationLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:12]);
        self.rateButton.layer.cornerRadius = [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20];
        
        [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-80] - bottomSafePadding);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
        }];
        
        [self.durationLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-80] - bottomSafePadding);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-20]);
        }];
        
        [self.progressSlider mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.timeLabel.mas_centerY);
            make.left.equalTo(self.timeLabel.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:10]);
            make.right.equalTo(self.durationLabel.mas_left).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-10]);
            make.height.mas_equalTo([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
        }];
        
        [self.playButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.progressSlider.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
            make.centerX.equalTo(self.mas_centerX);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
        
        [self.rateButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-20]);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:40], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:40]));
        }];
        
        [self.fullScreenButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.playButton.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-20]);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
    }else{
        [self.blackButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20]);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:80] + leftSafePadding);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.blackButton.mas_centerY);
            make.left.equalTo(self.blackButton.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:10]);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-100] + rightSafePadding);
        }];
        
        self.titleLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:28]);
        self.timeLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]);
        self.durationLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]);
        self.rateButton.layer.cornerRadius = [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20];
        
        [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-60] - bottomSafePadding);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:80] + leftSafePadding);
        }];
        
        [self.durationLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-60] - bottomSafePadding);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-80] - rightSafePadding);
        }];
        
        [self.progressSlider mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.timeLabel.mas_centerY);
            make.left.equalTo(self.timeLabel.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:10]);
            make.right.equalTo(self.durationLabel.mas_left).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-10]);
            make.height.mas_equalTo([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20]);
        }];
        
        [self.playButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.progressSlider.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20]);
            make.centerX.equalTo(self.mas_centerX);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]));
        }];
        
        [self.rateButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-80] - rightSafePadding);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:40], [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:40]));
        }];
        
        [self.fullScreenButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.playButton.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-80] - rightSafePadding);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]));
        }];
    }
}

- (void)blackAction {
    if (self.blackActionBlock) {
        self.blackActionBlock();
    }
}

- (void)progressSliderValueChanged:(UISlider *)slider {
    if (self.progressChangeBlock) {
        self.progressChangeBlock();
    }
}

- (void)playAction:(UIButton *)sender {
    sender.selected = !sender.selected;
    if (self.playActionBlock) {
        self.playActionBlock(sender.selected);
    }
}

- (void)rateAction:(UIButton *)sender {
    if (self.rateActionBlock) {
        self.rateActionBlock(sender);
    }
}

- (void)fullScreenAction:(UIButton *)sender {
    sender.selected = !sender.selected;
    if (self.fullScreenActionBlock) {
        self.fullScreenActionBlock(sender.selected);
    }
    [self updateFrameWithFull:sender.selected];
}

- (CGFloat)getSYRealValueWithWidth:(CGFloat)width isFull:(BOOL)isFull isValue:(CGFloat)isValue {
    CGFloat realValue = 0.0;
    if (isFull) {
        //横屏
        realValue = isValue / 834.0f * width;
    }else{
        //竖屏
        realValue = isValue / 375.0f * width;
    }
    
    return realValue;
}

- (void)updateFrameWithFull:(NSInteger)isFull {
    CGFloat leftSafePadding = 0.0;
    CGFloat rightSafePadding = 0.0;
    CGFloat bottomSafePadding = 0.0;
    if (@available(iOS 11.0, *)) {
        leftSafePadding = self.safeAreaInsets.left;
        rightSafePadding = self.safeAreaInsets.right;
        bottomSafePadding = self.safeAreaInsets.bottom;
    }
    CGFloat screenWidth = [UIScreen mainScreen].bounds.size.height;
    
    if (isFull == 0) {
        [self.blackButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20] + LSNAVIGATION_BAR_HEIGHT);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
        
        [self.titleLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.blackButton.mas_centerY);
            make.left.equalTo(self.blackButton.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:10]);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-70]);
        }];
        
        self.titleLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:18]);
        self.timeLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:12]);
        self.durationLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:12]);
        self.rateButton.layer.cornerRadius = [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20];
        
        [self.timeLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-80] - bottomSafePadding);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
        }];
        
        [self.durationLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-80] - bottomSafePadding);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-20]);
        }];
        
        [self.progressSlider mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.timeLabel.mas_centerY);
            make.left.equalTo(self.timeLabel.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:10]);
            make.right.equalTo(self.durationLabel.mas_left).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-10]);
            make.height.mas_equalTo([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
        }];
        
        [self.playButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.progressSlider.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:20]);
            make.centerX.equalTo(self.mas_centerX);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
        
        [self.rateButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-20]);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:40], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:40]));
        }];
        
        [self.fullScreenButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.playButton.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:-20]);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
    }else{
        [self.blackButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20]);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:80] + leftSafePadding);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:NO isValue:24]));
        }];
        
        [self.titleLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.blackButton.mas_centerY);
            make.left.equalTo(self.blackButton.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:10]);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-100] + rightSafePadding);
        }];
        
        self.titleLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:28]);
        self.timeLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]);
        self.durationLabel.font = LSSystemFont([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]);
        self.rateButton.layer.cornerRadius = [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20];
        
        [self.timeLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-60] - bottomSafePadding);
            make.left.equalTo(self).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:80] + leftSafePadding);
        }];
        
        [self.durationLabel mas_updateConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-60] - bottomSafePadding);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-80] - rightSafePadding);
        }];
        
        [self.progressSlider mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.timeLabel.mas_centerY);
            make.left.equalTo(self.timeLabel.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:10]);
            make.right.equalTo(self.durationLabel.mas_left).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-10]);
            make.height.mas_equalTo([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20]);
        }];
        
        [self.playButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.progressSlider.mas_bottom).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:20]);
            make.centerX.equalTo(self.mas_centerX);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]));
        }];
        
        [self.rateButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-80] - rightSafePadding);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:40], [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:40]));
        }];
        
        [self.fullScreenButton mas_updateConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.playButton.mas_centerY);
            make.right.equalTo(self.mas_right).with.offset([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:-80] - rightSafePadding);
            make.size.mas_equalTo(CGSizeMake([self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24], [self getSYRealValueWithWidth:screenWidth isFull:YES isValue:24]));
        }];
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
